/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Interpreter;

import java.util.ArrayList;
import java.util.Iterator;

/**
 *
 * @author Jenny Patrick
 */
public class Interpreter {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        String romano = "LXV";
        
        Contexto contexto = new Contexto(romano);
        
        ArrayList<Expresion> arbol = new ArrayList<Expresion>();
        arbol.add(new CienExpresion());
        arbol.add(new MilExpresion());
        arbol.add(new DiezExpresion());
        arbol.add(new UnaExpresion());
        
        Iterator<Expresion>x = arbol.iterator();
        while(x.hasNext()){
            Expresion exp = x.next();
            exp.interpreter(contexto);
        }
        System.out.println(contexto.salida);
    }
}
